import { Component, OnInit } from '@angular/core';
import { SystemConfigService } from '@core/services/system-config.service';

@Component({
  selector: 'app-person-info',
  templateUrl: './person-info.component.html',
  styleUrls: ['./person-info.component.less']
})
export class PersonInfoComponent implements OnInit {
  public staffInfos : any = {
    name: '',
    staffNo: '',
    phone: '',
  };
  public roleInfos : any = [
    {
      name: ''
    }
  ];
  constructor(private systemService: SystemConfigService) { }

  ngOnInit() {
    this.systemService.getpersonInfo().then((data: any) => {
      if(data.data.staff!=null){
        this.staffInfos = data.data.staff;
      }
      if(data.data.roles!=null){
        this.roleInfos = data.data.roles;
      }
      console.log(this.staffInfos)
    }, data => {
    });
  }

}
